<template>
  <view class="flex flex-col h-full">
    <u-navbar class="text-right" placeholder border auto-back/>
    <view class="card m-10px">
      <label class="block text-center text-18px font-bold mb-20px">{{notifDetail.title}}</label>
      <view class="mt-10px text-14px text-slate-600">
        {{notifDetail.content}}
      </view>
      <label class="block text-right text-12px text-slate-400 mt-10px">{{notifDetail.createTime}}</label>
    </view>
  </view>
</template>

<script setup lang="ts">
import { ref  } from 'vue'
import UNavbar from "@/uni_modules/uview-plus/components/u-navbar/u-navbar.vue";
import type {Notif} from "@/api/user";
import {onLoad} from "@dcloudio/uni-app";

// 通知数据列表
const notifDetail = ref<Notif>( {
  nId: 1,
  title: '测试通知',
  content: '这是测试通知的内容',
  createTime: '2023-03-01 11:54:20',
  updateTime: '',
  viewStatus: 0,
  viewTime: ''
})
interface OptionParam{
  nId: number
}
const nId = ref<number | null>(null)
onLoad((option) => {
  const data = option as OptionParam
  nId.value = data.nId
})
</script>

<style lang="scss">
</style>
